import { RouteComponent, RouteMeta } from "vue-router";

export interface MenuItemRes {
    //定义索引签名
    [key: string]: string | number | Object | Array<MenuItemRes> | undefined | RouteMeta| RouteComponent
    component: string | RouteComponent
    children: Array<MenuItemRes>
    createBy: string
    createTime: string
    icon: string
    isCache: string
    isFrame: string
    menuId: number
    menuName: string
    menuType: string
    name: string
    params: object
    parentId: number
    parentName: string
    path: string
    perms: string
    query: string
    remark: string
    sort: number
    status: string
    updateBy: string
    updateTime: string
    visible: string
    //添加RouteRecordRaw必须有的属性，以便用as作为转换为路由挂载到router
    redirect?: string,
    meta?: RouteMeta,
}

export interface MenuListRes {
    count: number
    list: Array<MenuItemRes>
}